import Login from './views/Login.vue'
import NotFound from './views/404.vue'
import Home from './views/Home.vue'
import Table from './views/nav1/Table.vue'
import Form from './views/nav1/Form.vue'
import user from './views/nav1/user.vue'
import echarts from './views/charts/echarts.vue'
import department from './views/org/department.vue'
import employee from './views/org/employee.vue'
import shop from './views/org/shop.vue'
import type from './views/sysdir/SystemDictionaryType'
import detail from './views/sysdir/SystemDictionaryDetail'
import shopRegister from './views/ShopRegister'
import searchMasterMsgPending from './views/pet/SearchMasterMsgPending'
import searchMasterMsgProcessed from './views/pet/SearchMasterMsgProcessed'
import pet from './views/pet/Pet'
import AdoptOrder from './views/order/AdoptOrder'
import ProductOrder from './views/order/ProductOrder'
import Product from './views/product/Product'
import User from './views/user/User'
import wxUser from './views/user/wxUser'

let routes = [
    {
        path: '/login',
        component: Login,
        name: '',
        hidden: true
    },
    {
        path: '/shopRegister',
        component: shopRegister,
        name: '',
        hidden: true
    },
    {
        path: '/404',
        component: NotFound,
        name: '',
        hidden: true
    },
    //{ path: '/main', component: Main },
    {
        path: '/',
        component: Home,
        name: '首页',
        iconCls: 'el-icon-s-home',
        leaf: true,
        children: [
            { path: '/echarts', component: echarts, name: '首页' }
        ]
    },
    {
        path: '/',
        component: Home,
        name: '组织机构管理',
        iconCls: 'el-icon-message',//图标样式class
        children: [
            { path: '/department', component: department, name: '部门管理'},
            { path: '/employee', component: employee, name: '员工管理' },
            { path: '/shop', component: shop, name: '店铺管理' },
            { path: '/from', component: Form, name: '表单' },
        ]
    },
    {
        path: '/',
        component: Home,
        name: '宠物管理',
        iconCls: 'el-icon-setting',//图标样式class
        children: [
            { path: '/SearchMasterMsgPending', component: searchMasterMsgPending, name: '寻主消息管理' },
            { path: '/SearchMasterMsgProcessed', component: searchMasterMsgProcessed, name: '寻主消息进程管理' },
            { path: '/pet', component: pet, name: '宠物' },
        ]
    },
    {
        path: '/',
        component: Home,
        name: '系统管理',
        iconCls: 'el-icon-setting',//图标样式class
        children: [
            { path: '/log', component: Table, name: '日志管理' },
            { path: '/detail', component: detail, name: '数据字典管理' },
            { path: '/dictionartype', component: type, name: '数据类型管理' },
        ]
    },
    {
        path: '/',
        component: Home,
        name: '订单管理',
        iconCls: 'el-icon-s-custom',//图标样式class
        children: [
            { path: '/adoptOrder', component: AdoptOrder, name: '领养订单' },
            { path: '/acquisitionOrder', component: AdoptOrder, name: '收购订单' },
            { path: '/productOrder', component: ProductOrder, name: '服务订单' },
            { path: '/goodsOrder', component: AdoptOrder, name: '商品订单' },
            { path: '/rechargeOrder', component: AdoptOrder, name: '充值订单' }
        ]
    },
    {
        path: '/',
        component: Home,
        name: '用户管理',
        iconCls: 'el-icon-s-custom',//图标样式class
        children: [
            { path: '/user', component: User, name: '用户' },
            { path: '/wxUser', component: wxUser, name: '微信' },
        ]
    },
    {
        path: '/',
        component: Home,
        name: '产品管理',
        iconCls: 'el-icon-s-custom',//图标样式class
        children: [
            { path: '/product', component: Product, name: '产品' },
            { path: '/productComment', component: Product, name: '产品评价' },
        ]
    },
    {
        path: '*',
        hidden: true,
        redirect: { path: '/404' }
    }
];

export default routes;